package com.roubsite.cloud.sysuser.bean;

import com.roubsite.cloud.common.userinfo.SecurityUserDetails;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class User implements Serializable {
    private String userId;
    private String userName;
    private String avatar;
    private List<String> roles;

    public User(SecurityUserDetails userDetails) {
        this.userId = userDetails.getUserId();
        this.userName = userDetails.getUserName();
        this.roles = userDetails.getAccessURLs();
    }
}
